﻿<UserControl x:Class="DirectoryAnalyzer.Controls.StatusProgressBar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:conv="clr-namespace:DirectoryAnalyzer.Controls.Converters"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <Border >
        <Grid Height="20">
            <Grid.Resources>
                <conv:PercentageConverter x:Key="PercentageConverter" />
                <conv:InversionConverter x:Key="InversionConverter" />
            </Grid.Resources>
            <Grid.RowDefinitions>
                <RowDefinition />
            </Grid.RowDefinitions>

            <ProgressBar Name="prgProgress" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Transparent" Foreground="#FF5757FC" />
            <TextBlock Name="txtbProgress" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding ElementName=prgProgress, Path=Value, Converter={StaticResource PercentageConverter}}" Background="Transparent" />
            <TextBlock Name="txtbDetails" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding ElementName=txtbProgress, Path=Visibility, Converter={StaticResource InversionConverter}, ConverterParameter=-}" Background="Transparent" />
        </Grid>
    </Border>
</UserControl>
